#include <stdio.h>
void copy_arr(double target[], double source[], int n);
void copy_two_arr(double target[][3], double source[][3], int m);
void show_arr(double arr[][3], int n);
int main(void)
{
    // double source[5] = { 1.1, 2.2, 3.3, 4.4, 5.5 };
    double source[2][3] = {{1, 2, 3}, {4, 5, 6}};
    double target[2][3];

    copy_two_arr(target, source, 2);
    show_arr(target, 2);

    return 0;
}

void copy_two_arr(double target[][3], double source[][3], int m)
{
    int i, j;

    for (i = 0; i < m; i++)
    {
        copy_arr(target[i], source[i], 3);
    }
}

void copy_arr(double target[], double source[], int n)
{   
    int i;

    for (i = 0; i < n; i++)
        target[i] = source[i];

    return;
}

void show_arr(double arr[][3], int n)
{
    int i, j;

    for (i = 0; i < n; i++)
    {
        for (j = 0; j < 3; j++)
            printf("arr[%d][%d]=%.1lf   ", i, j, arr[i][j]);
        putchar('\n');
    }

    return;
}